package com.melorour.product.exception;

import com.melorour.product.enums.ResultEnum;
import lombok.Getter;

/**
 * @author Melorour on 2018/4/13.
 */
@Getter
public class ProductException extends RuntimeException {

    private Integer code;

    public ProductException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
